import time
from selenium.webdriver.common.by import By
from rikaoday11.Base import Base

# class Page(Base):
#     # 定位器
#     # 搜索框定位
#     search_loc=(By.XPATH,'//*[@id="searchForm"]/div[1]/input')
#     # 对搜索按钮进行定位
#     searchbtn_loc=(By.XPATH,'//*[@id="searchForm"]/div[2]/input')
#     # 对输入框进行操作
#     # 封装一个输入框的方法
#     def search(self):
#         self.send_keys(self.search_loc,info='白云边')
#     # 封装一个搜索按钮的方法
#     def searchbtn(self):
#         self.click(self.searchbtn_loc)
#     # 业务逻辑
#     def A3Mall_louji(self):
#         self.open_url('http://10.59.9.14:7003/')
#         time.sleep(3)
#         self.search()
#         time.sleep(2)
#         self.searchbtn()
class Page(Base):
    search_loc=(By.XPATH,'//*[@id="searchForm"]/div[1]/input')
    searchbtn_loc=(By.XPATH,'//*[@id="searchForm"]/div[2]/input')
    def search(self):
        self.send_keys(self.search_loc,info='白云边')
    def searchbtn(self):
        self.click(self.searchbtn_loc)
    def A3Mall_luoji(self):
        self.open_url('http://10.59.9.14:7003/')
        time.sleep(2)
        self.search()
        time.sleep(2)
        self.searchbtn()